package com.ibangnuo.manage.dao;

import com.ibangnuo.framework.domain.Order;
import com.ibangnuo.framework.domain.Terminal;
import com.ibangnuo.framework.domain.request.order.OrderQueryCountRequest;
import com.ibangnuo.framework.domain.request.order.OrderQueryGroupRequest;
import com.ibangnuo.framework.domain.request.order.OrderQueryRequest;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;
import java.util.Optional;

/**
 * @Author: wwy
 * @Date: 2020-01-02 15:56
 */
@Mapper
public interface OrderMapper {

    List<Map> queryGroup(OrderQueryGroupRequest orderQueryGroupRequest);

    Map queryCount(Map map);

    Order terminalCount(Optional<Terminal> byId);

    //门店
   /* Map consumeCount(String id);

    Map actualCount(String id);

    Map tuiCount(String id);

    Map discountsCount(String id);*/

    //商户
  /*  Map tConsumeCount(String id);

    Map tActualCount(String id);

    Map tTuiCount(String id);

    Map tDiscountsCount(String id);*/

    //按时间的门店汇总
    Map consumeCount1(Map map);

    Map actualCount1(Map map);

    Map tuiCount1(Map map);

    Map discountsCount1(Map map);

    //按时间的商户的汇总
    Map tConsumeCount1(Map map);

    Map tActualCount1(Map map);

    Map tTuiCount1(Map map);

    Map tDiscountsCount1(Map map);

    //按钮的有效汇总的总计金额
    Map findAmountMoney(OrderQueryRequest orderQueryRequest);

    //机具
//机具微信汇总
    Map countConsumelWx(Map map);

    Map countActualWx(Map map);

    Map tuiCountWx(Map map);

    Map discountsCountWx(Map map);

    //机具的支付宝汇总
    Map countConsumelAlipay(Map map);

    Map tuiCountAlipay(Map map);

    Map countActualAlipay(Map map);

    Map discountsCountAlipay(Map map);
//门店微信按时间汇总
    Map consumeShopWx(Map map);

    Map tuiShopWx(Map map);

    Map actualShopWx(Map map);

    Map discountsShopWx(Map map);
//门店支付宝按时间汇总
    Map consumeShopAlipay(Map map);

    Map tuiShopAlipay(Map map);

    Map actualShopAlipay(Map map);

    Map discountsShopAlipay(Map map);
//商户微信时间汇总 
    Map tConsumeCountWx(Map map);

    Map tActualCountWx(Map map);

    Map tTuiCountWx(Map map);

    Map tDiscountsCountWx(Map map);
//商户支付宝时间汇总
    Map tConsumeCountAlipay(Map map);

    Map tActualCountAlipay(Map map);

    Map tTuiCountAlipay(Map map);

    Map tDiscountsCountAlipay(Map map);

    /**
     * 代理商支付宝订单统计
     * @param map
     * @return
     */
    Map<String,Object> discountsCommissionAlipayNew(Map map);
}
